﻿<ResourceDictionary 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:clr="clr-namespace:System;assembly=mscorlib">
    
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="MainTheme.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <!--TextBox Style-->
    <Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource TextControlStyle}">
        <Setter Property="Foreground" Value="{DynamicResource TextBoxForeground}"/>
        <Setter Property="Background" Value="{DynamicResource TextBoxBackground}"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Margin" Value="3"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TextBoxBase}">
                    <Border   Name="Border"
                              CornerRadius="5" 
                              Padding="3"
                              Background="{DynamicResource TextBoxBackground}"
                              BorderBrush="{DynamicResource TextBoxBackground}"
                              BorderThickness="1" 
                            
                              
                     >
                        <ScrollViewer Margin="0" x:Name="PART_ContentHost"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Cursor" Value="Hand"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <!--<Setter TargetName="Border" Property="Background" Value="Red"/>
                            <Setter TargetName="Border" Property="BorderBrush" Value="Red"/>
                            <Setter Property="Foreground" Value="Red"/>-->
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--PasswordBox Style (same as TextBox)-->
    <Style TargetType="{x:Type PasswordBox}" BasedOn="{StaticResource TextControlStyle}">
        <Setter Property="Foreground" Value="{DynamicResource TextBoxForeground}"/>
        <Setter Property="Background" Value="{DynamicResource TextBoxBackground}"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Margin" Value="3"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type PasswordBox}">
                    <Border   Name="Border"
                              CornerRadius="5" 
                              Padding="3"
                              Background="{DynamicResource TextBoxBackground}"
                              BorderBrush="{DynamicResource TextBoxBackground}"
                              BorderThickness="1" 
                            
                              
                     >
                        <ScrollViewer Margin="0" x:Name="PART_ContentHost"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Cursor" Value="Hand"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <!--<Setter TargetName="Border" Property="Background" Value="Red"/>
                            <Setter TargetName="Border" Property="BorderBrush" Value="Red"/>
                            <Setter Property="Foreground" Value="Red"/>-->
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


</ResourceDictionary>